package June;

public class Test_17_1 {
    public static void main(String[] args) {
        person2 p1 = new person2("king", 18);
        System.out.println();
    }
}

//构造器的使用
class person2 {
    String name;
    int age;
    //构造器
    public person2(String name, int age) {
        this.name = name;
        this.age = age;
    }
}